The Dreamweaver JavaScript API > File manipulation functions > dreamweaver.setUpComplexFindReplace()

 

dreamweaver.setUpComplexFindReplace()

Availability

Dreamweaver 3.0

Description

Prepares for an advanced text or tag search by loading the specified XML query.

Arguments

xmlQueryString

xmlQueryString is a string of XML code beginning with <dwquery> and ending with </dwquery>. (To get a string of the proper format, set up the query in the Find dialog box, click the Save Query button, open the query file in a text editor, and copy everything from the beginning of the <dwquery> tag to the end of the </dwquery> tag.)

Returns

Nothing.

Enabler

None.

Example

The first statement in the following code sets up a tag search and specifies that the scope of the search should be four files; the second statement performs the search and replace operation:

dw.setUpComplexFindReplace('<dwquery><queryparams matchcase="false" ¬
ignorewhitespace="true" useregexp="false"/><find><qtag qname="a">¬
<qattribute qname="href" qcompare="=" qvalue="#"></qattribute>¬
<qattribute qname="onMouseOut" qcompare="=" qvalue="" ¬
qnegate="true"></qattribute></qtag></find><replace ¬
action="setAttribute" param1="onMouseOut" ¬
param2="this.style.color='#000000';¬
this.style.fontWeight='normal'"/></dwquery>');
dw.replaceAll();